<!-- 重用组件 -->
<template>
  <div>
    <h1>父组件</h1>
    <!-- 页面中使用子组件的标签 -->
    <my-button type="primary" size="small">1</my-button>
    <my-button type="danger" size="middle">2</my-button>
    <my-button type="success" size="large">3</my-button>
  </div>
</template>
<script>
// 导入子组件
import MyButton from "../components/MyButton.vue";
const options = {
  components: {
    // 子组件，简写形式，属性名和属性值都是 MyButton
    MyButton
  }
};
export default options;
</script>
<style scoped>
div {
  background-color: gainsboro;
  width: 100%;
  height: 400px;
}
h1 {
  font-family: 华文行楷;
}
</style>